<!DOCTYPE html>
<html lang="en">
    <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Vue Template</title>
</head>
<body>
    <div id="app">
        <father></father>
        <son></son>
    </div>
<script src="../js/vue.js"></script>
<script>
    const son = Vue.extend({
        template:`
            <div>
                <p>儿子组件</p> 
            </div>
        `
    })

    const father = Vue.extend({
        template:`
            <div>
                <p>爸爸组件</p> 
                <son></son>
            </div>
        `,
        components:{
            son:son
        }
    })

    const app = new Vue({
        el: '#app',
        data: {
            message: 'hello Vue!'
        },
        components:{
            father:father,
            son:son
        }
    })
</script>
</body>
</html>